Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jan 2, 2023

Closes: #8511

Description

This PR updates the logic on Hub menu to observe the logged-in site to update its title and URL accordingly.

Also: a new boolean was added to hide the Switch store button when the user is logged in with site credentials only.

Testing instructions

Prerequisite: Make sure that application password is enabled on your test site.

  • Enable the feature flag applicationPasswordAuthenticationForSiteCredentialLogin and build the app.
  • Log out of the app if needed.
  • On the prologue screen, select "Enter your site address". If this option is not available, disable simplified login and build the app again.
  • Enter your test store address and select "Sign in with site credentials".
  • Enter correct credentials and select "Continue". The app should navigate to the home screen after that.
  • Navigate to the Menu tab. Notice that the site title and URL are updated correctly. The Switch store button should be hidden.

Please feel free to test again by logging in with a WPCom account. The menu should work as before.

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added type: task An internally driven task. status: feature-flagged Behind a feature flag. Milestone is not strongly held. feature: hub menu Related to the Hub Menu tab. labels Jan 2, 2023
@itsmeichigo itsmeichigo added this to the 11.8 milestone Jan 2, 2023
@itsmeichigo itsmeichigo marked this pull request as ready for review January 2, 2023 10:14
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8518-41e08af on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@selanthiraiyan selanthiraiyan self-assigned this Jan 3, 2023
Copy link
Contributor

@selanthiraiyan selanthiraiyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected. 🚢

XCTAssertEqual(viewModel.woocommerceAdminURL, try URL(string: expectedAdminURL)?.asURL())
}

func test_switchStoreEnabled_returns_true_when_logged_in_with_wpcom() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests. ❤️

@itsmeichigo itsmeichigo merged commit 8a659f0 into trunk Jan 3, 2023
@itsmeichigo itsmeichigo deleted the issue/8511-site-publisher-on-hub-menu branch January 3, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: hub menu Related to the Hub Menu tab. status: feature-flagged Behind a feature flag. Milestone is not strongly held. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REST API] Invalid store address in My Store

4 participants